import { deleteTodo } from '../store/action'

const ListItem = ({ todo, store }) => {
    return (
        <li className='list-group-item d-flex justify-content-between align-items-center'>
            {todo}
            <button className='btn btn-danger' onClick={() => store.dispatch(deleteTodo(todo))}>删除</button>
        </li>)
}

export default ListItem
